package com.edu.juc.forkJoin;

import java.util.concurrent.ForkJoinPool;

public class ForkJoinTest {
    public static void main(String[] args) {
        MyTask myTask = new MyTask(0, 100);
        ForkJoinPool forkJoinPool = new ForkJoinPool();
        forkJoinPool.submit(myTask);
        System.out.println("new MyTask(0, 100) = " + forkJoinPool.invoke(myTask));
        forkJoinPool.shutdown();
    }
}
